Restructuring Functions with Low Cohesion

نویسندگان

  • Arun Lakhotia
  • Jean-Christophe Deprez
چکیده

We present a technique for restructuring functions with low cohesion into functions with high cohesion. Such restructuring is desirable when re-architecting a legacy system into an object-oriented architecture. The restructured system has functions with higher cohesion and hence lower coupling. This enables finer-grained grouping of functions into objects. Automatically decomposing a function is difficult when its computations are interleaved. The challenge lies in programmatically identifying and separating the various activities performed by a complex code segment. The technique presented partitions the set of output variables of a function on the basis of their pairwise cohesion. Program slicing is then used to identify the statements that perform computations for each variable group in the partition. New functions corresponding to the slices are created to replace the original function. Experiences with restructuring real-world code using a tool that implements the technique are presented.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Using Clustering Technique to Restructure Programs

Program restructuring or refactoring is often required when a function becomes too large or is involved in multiple activities and therefore exhibits low cohesion. A critical factor in restructuring is to increase cohesion and decrease coupling. There are many existing methods which measure cohesion and coupling but do not provide much information as to how to restructure the program, while som...

متن کامل

Program Restructuring Through Clustering Technique

Program restructuring is a key method to improve the quality of ill-structured programs and therefore to increase the understandability and reduce the maintenance cost. It is a challenging task and much research is still ongoing. This paper presents an approach to program restructuring at the functional level based on the clustering technique with cohesion as the major concern. Clustering has b...

متن کامل

Concept Analysis for Module Restructuring

ÐLow coupling between modules and high cohesion inside each module are the key features of good software design. This is obtained by encapsulating the details about the internal structure of data and exporting only public functions with a clean interface. The only native support to encapsulation offered by procedural programming languages, such as C, is the possibility to limit the visibility o...

متن کامل

Program restructuring using clustering techniques

Program restructuring is a key method for improving the quality of ill-structured programs, thereby increasing the understandability and reducing the maintenance cost. It is a challenging task and a great deal of research is still ongoing. This paper presents an approach to program restructuring inside of a function based on clustering techniques with cohesion as the major concern. Clustering h...

متن کامل

Computer Science Technical Report Design-level Cohesion Measures: Derivation, Comparison, and Applications

Cohesion was rst introduced as a software attribute that could be used to predict properties of implementations that would be created from a given design. Unfortunately, cohesion, as originally de ned, could not be objectively assessed, while more recently developed objective cohesion measures depend on code-level information. We show that association-based and slice-based approaches can be use...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999